package se.webbzon.oschi01.worldeditor;

import se.webbzon.oschi01.worldobject.WorldObject;

public abstract class WorldObjectInflator {
	
	// The name of the world object that can be created by
	// this inflator
	private final String worldObjectName;
	
	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new abstract world object inflator which can be
	 * used to deserialize a world object. **/
	public WorldObjectInflator(String worldObjectName) {
		this.worldObjectName = worldObjectName;
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Creates a new world object by using the provided serializable form
	 * of the world object (WorldObjectDeflation). **/
	public abstract WorldObject makeWorldObject(WorldObjectDeflation deflation);
	
	/** Creates a new world object deflation instance used to serialize and 
	 * deserialize a world object. **/
	public abstract WorldObjectDeflation makeDeflation(	int deflationProperties,
														WorldObject[] dependencies);
	
	/** Returns the name of the world object that can be created by
	/* this inflator. **/
	public String getWorldObjectName() {
		return worldObjectName;
	}

}
